package com.janas.kktv;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class WelcomeActivity extends Activity {
	
	public final String TAG = WelcomeActivity.class.getSimpleName();
	
	private Button mbtnSummary, mbtnFoodTagging;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_welcome);
		
		mbtnSummary 	= (Button) findViewById(R.id.summaryButton);
		mbtnSummary.setOnClickListener( new SummaryListener() );
		
		mbtnFoodTagging = (Button) findViewById(R.id.foodTaggingButton);
		mbtnFoodTagging.setOnClickListener( new FoodTaggingListener() );
		
	}

	
	private class SummaryListener implements OnClickListener {

		@Override
		public void onClick(View v) {			
			
			Intent lGoToSummary = new Intent(WelcomeActivity.this, SummaryActivity.class);
			startActivity(lGoToSummary);
			Log.d( TAG , "SummaryListener");
		}		
	}
	
	
	private class FoodTaggingListener implements OnClickListener {
		
		@Override
		public void onClick(View v) {
			
			Intent lFoodTagging = new Intent(WelcomeActivity.this, FoodTaggingActivity.class);
			startActivity(lFoodTagging);
			Log.d( TAG , "FoodTaggingListener");
		}
	}

}
